package com.example.lxj.LegalCase.service.impl;

import java.util.List;

import cn.hutool.core.date.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.lxj.LegalCase.mapper.TbCaseIdentificationMaterialsMapper;
import com.example.lxj.LegalCase.entity.TbCaseIdentificationMaterials;
import com.example.lxj.LegalCase.service.ITbCaseIdentificationMaterialsService;

/**
 * 案件鉴定材料Service业务层处理
 * 
 * @author lxj
 * @date 2024-10-23
 */
@Service
public class TbCaseIdentificationMaterialsServiceImpl implements ITbCaseIdentificationMaterialsService 
{
    @Autowired
    private TbCaseIdentificationMaterialsMapper tbCaseIdentificationMaterialsMapper;

    /**
     * 查询案件鉴定材料
     * 
     * @param id 案件鉴定材料主键
     * @return 案件鉴定材料
     */
    @Override
    public TbCaseIdentificationMaterials selectTbCaseIdentificationMaterialsById(Long id)
    {
        return tbCaseIdentificationMaterialsMapper.selectTbCaseIdentificationMaterialsById(id);
    }

    /**
     * 查询案件鉴定材料列表
     * 
     * @param tbCaseIdentificationMaterials 案件鉴定材料
     * @return 案件鉴定材料
     */
    @Override
    public List<TbCaseIdentificationMaterials> selectTbCaseIdentificationMaterialsList(TbCaseIdentificationMaterials tbCaseIdentificationMaterials)
    {
        return tbCaseIdentificationMaterialsMapper.selectTbCaseIdentificationMaterialsList(tbCaseIdentificationMaterials);
    }

    /**
     * 新增案件鉴定材料
     * 
     * @param tbCaseIdentificationMaterials 案件鉴定材料
     * @return 结果
     */
    @Override
    public int insertTbCaseIdentificationMaterials(TbCaseIdentificationMaterials tbCaseIdentificationMaterials)
    {
        tbCaseIdentificationMaterials.setCreateTime(DateUtil.date());
        return tbCaseIdentificationMaterialsMapper.insertTbCaseIdentificationMaterials(tbCaseIdentificationMaterials);
    }

    /**
     * 修改案件鉴定材料
     * 
     * @param tbCaseIdentificationMaterials 案件鉴定材料
     * @return 结果
     */
    @Override
    public int updateTbCaseIdentificationMaterials(TbCaseIdentificationMaterials tbCaseIdentificationMaterials)
    {
        tbCaseIdentificationMaterials.setUpdateTime(DateUtil.date());
        return tbCaseIdentificationMaterialsMapper.updateTbCaseIdentificationMaterials(tbCaseIdentificationMaterials);
    }

    /**
     * 批量删除案件鉴定材料
     * 
     * @param ids 需要删除的案件鉴定材料主键
     * @return 结果
     */
    @Override
    public int deleteTbCaseIdentificationMaterialsByIds(Long[] ids)
    {
        return tbCaseIdentificationMaterialsMapper.deleteTbCaseIdentificationMaterialsByIds(ids);
    }

    /**
     * 删除案件鉴定材料信息
     * 
     * @param id 案件鉴定材料主键
     * @return 结果
     */
    @Override
    public int deleteTbCaseIdentificationMaterialsById(Long id)
    {
        return tbCaseIdentificationMaterialsMapper.deleteTbCaseIdentificationMaterialsById(id);
    }
}
